Repository navigation
Measure parallel encodes over the whole curve - #13
Merged
Merged
Conversation
The NVIDIA driver can put the first two encode sessions on one NVENC engine and start the second engine only with a third: an RTX 4090 measured 147, 205, 295 frames/s for 1 to 3 encodes (reproduced with FFmpeg alone), which the stop-at-the-first-small-step rule read as 1 engine. The measurement now always runs 1 to 4 encodes and takes the fewest reaching 85 % of the best total (2 for the earlier 399/789/852/881 curve, 3 for the new one). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
hardware::measure_parallel_encodesnow always runs 1 to 4 concurrent encodes.engines_from_throughputtakes the fewest encodes that reach 85 % of the best total. Before, the measurement stopped at the first step that added less than half of one encode.Why
The NVIDIA driver chooses which NVENC engine each session runs on. On the RTX 4090, with the same driver (621.24), two runs of
hevc_nvencp7 on a synthetic 1080p60 picture gave these totals:In the second run, the first two sessions shared one engine; the second engine only started with the third. That second curve was reproduced with FFmpeg alone, outside the app. The old rule never tried 3. 85 % rather than 90 %: 90 % classified the 2026-11-20 curve as 3.
The measurement now takes about 12 s instead of about 7 s, once per GPU, driver and encoder. A manual Encodes at once value is still never overwritten.
Checked
.\scripts\build.ps1passes. The unit test covers both 4090 curves, one shared engine, three engines and a session limit.docs/architecture.mdandCHANGELOG.md(Fixed) are updated.This PR will conflict with #12 in
CHANGELOG.md(both add to[Unreleased]); whichever merges second is rebased.🤖 Generated with Claude Code